package executor;

import support.JDBCUtil;

import java.sql.PreparedStatement;
import java.sql.SQLException;

public class DefaultStatementHandler implements StatementHandler {

    public PreparedStatement getStatement(String sql) throws SQLException {
        PreparedStatement preparedStatement = JDBCUtil.getStmt(sql);
        if (preparedStatement == null) {
            throw new RuntimeException("preparedStatement is null");
        }
        return preparedStatement;
    }
}
